/*
 * HttpHeader.cpp
 *
 */

#include "HttpHeader.h"
#include <sstream>

HttpHeader::HttpHeader(const std::string& name, const std::string& value):
name(name), value(value) {}

HttpHeader::~HttpHeader() {}

const std::string& HttpHeader::getName() const {
	return name;
}

const std::string& HttpHeader::getValue() const {
	return value;
}

std::string HttpHeader::getHeaderLine() const {
	std::stringstream buffer;
	buffer << name << SEPARATOR << value << HttpMessage::CRLF;
	return buffer.str();
}

const std::string HttpHeader::CONTENT_TYPE = "Content-Type";
const std::string HttpHeader::CONTENT_LENGTH = "Content-Length";
